// ============ AI工具调度系统 - 重构后的主入口文件 ============
// 此文件现在作为遗留兼容性入口，建议直接使用 aiTools/index.ts

// 导入新的模块化系统
export {
  useAiToolsStore,
  orchestrateToolCalls,
  executeToolCall,
  executeToolCallsRound,
  initAiToolsStore,
  initAiToolsStoreSync,
  getToolsSummary
} from './aiTools/index';

// 导出类型定义
export type {
  ToolDefinition,
  ToolExecutionRequest,
  ToolExecutionResult,
  ToolExecutionTask,
  ToolHandler,
  OrchestrationOptions,
  OrchestrationResult,
  ChatMessage,
  ToolCallResponse,
  ToolQueryFilter,
  ToolExecutionContext
} from './aiTools/index';

// 导出内置工具
export {
  BUILTIN_CHAT_COMPLETE,
  BUILTIN_WORKSPACE_SEARCH,
  BUILTIN_WORKSPACE_APPLY_EDITS,
  BUILTIN_WRITE_FILE,
  BUILTIN_CREATE_DIRECTORY,
  BUILTIN_LIST_DIRECTORY,
  BUILTIN_MOVE_FILE,
  BUILTIN_SEARCH_FILES,
  BUILTIN_GET_FILE_INFO,
  BUILTIN_READ_FILE,
  BUILTIN_READ_MULTIPLE_FILES
} from './aiTools/index';

// 向后兼容：重新导出主要函数
import { initAiToolsStoreSync } from './aiTools/index';

// 为了保持向后兼容性，保留原有的初始化函数名
export const initAiToolsStoreCompat = initAiToolsStoreSync;

// 旧版本导入的兼容性警告
console.warn(
  '[DEPRECATION WARNING] Direct import from aiTools.ts is deprecated. ' +
  'Please import from aiTools/index.ts instead for better performance and modularity.'
);